x86/traps: Rework #PF[Rsvd] bit handling
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 May 2020 15:13:33 +0000 (16:13 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 May 2020 19:04:23 +0000 (20:04 +0100)
commit9947ddbf7053bb9111d1e478986ef18764ea8aeb
treef411785ba236cd4b2c9711f57c218f141b690b72
parent87827167bb1737e826b0a8fe0abe07c0ace36ac5
x86/traps: Rework #PF[Rsvd] bit handling

The reserved_bit_page_fault() paths effectively turn reserved bit faults into
a warning, but in the light of L1TF, the real impact is far more serious.

Make #PF[Rsvd] a hard error, irrespective of mode.  Any new panic() caused by
this constitutes pagetable corruption, and probably an L1TF gadget needing
fixing.

Drop the PFEC_reserved_bit check in __page_fault_type() which has been made
dead by the rearrangement in do_page_fault().

Additionally, drop the comment for do_page_fault().  It is inaccurate (bit 0
being set isn't always a protection violation) and stale (missing bits
5,6,15,31).

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/traps.c